﻿
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

using Microsoft.AspNetCore.SignalR;
using Volo.Abp.AspNetCore.SignalR;

namespace XfTech.SmartTms.Hubs
{
    [HubRoute("/chathub")]
    public class MessagingHub: AbpHub
    {
        public async Task SendMessage(string targetUserName, string message)
        {
            var currentUserName = CurrentUser.UserName; //Access to the current user info
            var txt = L["MyText"];                      //Localization
            await Clients.All.SendAsync("ReceiveMessage", targetUserName, message);
        }

    }
}
